package com.example.lvsuo.controller;


import com.example.lvsuo.entity.RecordFolder;
import com.example.lvsuo.modal.Result;
import com.example.lvsuo.service.IRecordFolderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 案件归档文件夹表 前端控制器
 * </p>
 *
 * @author 心心念念
 * @since 2021-03-30
 */
@RestController
@RequestMapping("/recordFolder")
public class RecordFolderController {
    @Autowired
    IRecordFolderService iRecordFolderService;

    /**
     * 查询
     * @return
     */
    @GetMapping
    public Result getRecordFolder(){
        List<RecordFolder> list=iRecordFolderService.list();
        return Result.back("ok","200",list);
    }

    /**
     * 添加
     * @param recordFolder
     * @return
     */
    @PostMapping
    public Result insertRecordFolder(@RequestBody RecordFolder recordFolder){
        iRecordFolderService.save(recordFolder);
        return Result.back("ok","200");
    }

}

